﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="EmployeeKPITotalWeightPage.aspx.cs" Inherits="FBKPI.Pages.EmployeeKPITotalWeightPage" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script type="text/javascript">
    var oTable;
    var oFC;
    $(document).ready(function () {
        mainmenu("#nav ul", "#nav li");
        mainmenu("#menu_wrap ul", "#menu_wrap li");

        $("#movement").hide();

        $("#EmployeeTable").dataTable({
            "oLanguage": {
                "sZeroRecords": "No records to display",
                "sSearch": "Search"
            },
            "bSort": true,
            "bPaginate": true,
            "bAutoWidth": false,
            "bDestroy": true,
            "bProcessing": true,
            "bServerSide": true,
            "bJQueryUI": true,
            "sPaginationType": "full_numbers",
            "bDeferRender": true,
            "fnServerData": function (sSource, aoData, fnCallback) {
                $.ajax({
                    "dataType": 'json',
                    "type": "GET",
                    "url": "../Serializer/EmployeeTotalWeightKPISerializer.ashx?User=" + $("#txt_user").val(),
                    "data": aoData,
                    "success": fnCallback
                });
            },



            "aoColumns": [
             {
                 "mData": "No", "sWidth": "3%"
             }, {
                 "mData": "EmployeeName"
             }, {
                 "mData": "SubBranch"
             }, {
                 "mData": "Department"
             }, {
                 "mData": "Section"
             }, {
                 "mData": "SubSection"
             }, {
                 "mData": "JobPosition"
             }, {
                 "mData": "TotalWeight"
             }],
             "aoColumnDefs": [
            
//            {
//                "fnRender": function (oObj) {
//                    if (oObj.aData["isActive"] == 'True') {
//                        return "<img src='../images/check.png' />"
//                    } else {
//                        return "<img src='../images/cross.png' />"
//                    }
//                },
//                "aTargets": [9]
//            }

            //            , {
            //                "fnRender": function (oObj) {
            //                    return "<a  onclick=\"DrawKPITable('" + oObj.aData["ID"] + "')\"><img src='../images/detail.png' /></a>";
            //                },
            //                "aTargets": [0]
            //            }


            
//             {
//                 "bVisible": false,
//                 "aTargets": [5, 6, 8]
//             },
             {
                 "sClass": "center",
                 "aTargets": [0]
             }]
        });

    });
        
    </script>
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

  <div class="ui-widget-content">
        <table cellpadding="0" cellspacing="0" class="display" id="EmployeeTable">
            <thead>
                <tr>
                    
                    <th>
                        No
                    </th>
                    <th>
                        Employee Name
                    </th>
                    <th>
                        Sub Branch
                    </th>
                    <th>
                        Department
                    </th>
                    <th>
                        Section
                    </th>
                    <th>
                        Sub Section
                    </th>
                    <th>
                        Job Position
                    </th>
                   <th>
                        Total Weight
                    </th>
                   
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>


</asp:Content>
